<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="renderer" content="webkit">
    <title>网站信息</title>
    <link rel="stylesheet" href="/static/aesst/css/pintuer.css">
    <link rel="stylesheet" href="/static/aesst/css/admin.css">
    <script src="/static/aesst/js/jquery.js"></script>
    <script src="/static/aesst/js/pintuer.js"></script>
</head>
<body style="background-color:#f2f9fd;">
<div class="header bg-main">
    <div class="logo margin-big-left fadein-top">
        <h1><img src="/static/aesst/images/y.jpg" class="radius-circle rotate-hover" height="50" alt="" />宏大考试系统-学生端</h1>
    </div>
</div>

<div class="panel admin-panel">
    <div class="panel-head"style="text-align:center;"><strong><a style="font-size:30px;"><?php echo $tes['title']?></a><a style="margin-left:100px">考试时间：<?php echo $tes['times']?>分钟</a><a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;剩余时间：<a id="demo">11</a>分钟<a id="demos"></a>秒</a></strong></div>
    <div class="panel-head">
        <a class="button border-main" href="<?php echo url("index/main/infoa"); ?>?number=<?php echo $number;?>"><strong> 单选题</strong></a>
        <a style="margin-left: 5px" class="button border-main" href="<?php echo url("index/infob/index"); ?>?number=<?php echo $number;?>"><strong> 多选题</strong></a>
        <a style="margin-left: 5px" class="button border-main" href="<?php echo url("index/infoc/index"); ?>?number=<?php echo $number;?>"><strong> 判断题</strong></a>
        <a style="margin-left: 5px" class="button border-yellow" href="<?php echo url("index/infod/index"); ?>?number=<?php echo $number;?>"><strong> 填空题</strong></a>
        <a style="margin-left: 5px" class="button border-main" href="<?php echo url("index/infoe/index"); ?>?number=<?php echo $number;?>"><strong> 解答题</strong></a>
        <a style="margin-left:50px" class="button border-main" href="<?php echo url("index/infod/momo"); ?>"><strong> 试卷检查及提交</strong></a>
    </div>
    <div class="body-content" style="margin-left:20px">
        <form method="post" class="form-x" action="<?php echo url("index/infod/doAdd");?>">
            <!--            隐藏属性-->
            <input type="hidden"  name="number" value="<?php echo $nids['number']?>"/>
            <input type="hidden"  name="nid" value="<?php echo $nids['id']?>"/>
            <input type="hidden"  name="nids" value="<?php echo $nids['nid']?>"/>
            <input type="hidden"  name="answers" value="<?php echo $nids['answer']?>"/>
            <tr>
                <td><strong><?php echo $nids['nid'];?>、<?php echo $nids['title'];?></strong> <a style="margin-left:50px"> () </a></td>
            </tr>
            <br><br>
            <tr>
<!--                <textarea type="text" class="input w50" id="title" name="title" style="height:150px;" placeholder="试题题目"></textarea>-->
                <textarea  style="height:150px;width:300px"  type="text" name="answer"  /></textarea>
                <?php foreach($student as $key=>$student): ?>
                    <input type="hidden"  name="admin"  value="<?php echo $student['id']?>"/>
                <?php endforeach; ?>
            </tr>
            <div style="text-align:center">
                <tr>
                    <td><input type="submit" id="form-btn" value="提交"  class="btn"></td>
                    <input type="hidden"  name="id"  value="<?php echo $nidsss['id'];?>"/>
                </tr>
            </div>
        </form>
    </div>
</div>
<script  type="text/javascript">
    var lsecend = <?php echo $H;?>;
    var lsecends = <?php echo $i;?>;
    setInterval("myTimer()",1000)
    function myTimer() {
        lsecends = lsecends -1;
        lsecend = lsecend;
        console.log(lsecends);
        console.log(lsecend);
        if (lsecends < 0) {
            // 提交答题
            lsecend = lsecend -1;
            lsecends = 59;
        } else {
            // 页面显示剩余分秒
        }
        if (lsecend == 10 && lsecends==0) {
            alert("离考试结束还有十分钟");
        }
        if (lsecend == 0 && lsecends==30) {
            location.href="/index/mark/doad";
        }
        document.getElementById("demo").innerHTML=lsecend;
        document.getElementById("demos").innerHTML=lsecends;
    }
</script>
</body></html>